package site.immonkey.mailtest.beans;

import java.util.ArrayList;
import java.util.List;

public class Response {
	private int code = -1;
	private String msg;
	private List<String> otherInfo;

	public Response() {}

	public Response(int code) {
		super();
		this.code = code;
	}

	public Response(int code, String msg) {
		super();
		this.code = code;
		this.msg = msg;
	}

	public int getCode() {
		return code;
	}

	public void setCode(int code) {
		this.code = code;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public List<String> getOtherInfo() {
		return otherInfo;
	}

	public void setOtherInfo(List<String> otherInfo) {
		this.otherInfo = otherInfo;
	}

	public void addOthreInfo(String info) {
		if (otherInfo == null) otherInfo = new ArrayList<>();
		otherInfo.add(info);
	}
}
